package com.zgy.enums;

import java.nio.charset.StandardCharsets;

public enum OptionEnum {
    help(1,"public","h","help","","帮助信息", "Options"),


    cmd(1,"cmd","c","cmd","cmd","命令行参数模式", null),
    ModuleExcel(2,"cmd","","ModuleExcel","ModuleExcel","模板表<仅支持Excel*.xlsx版本>", null),
    InsertExcel(3,"cmd","","InsertExcel","InsertExcel","待写入表", null),
    CommitRow(4,"cmd","","CommitRow","CommitRow","每次提交的行数", "100"),
    SheetName(5,"cmd","","SheetName","SheetName","sheet页名称", "Sheet1"),
    DataFileName(6,"cmd","","DataFileName","DataFileName","数据文件名（全路径）", null),
    DataFileFieldSeparator(7,"cmd","","DataFileFieldSeparator","DataFileFieldSeparator","数据文件分隔符（全路径）", "\t"),
    DataFileCharSet(8,"cmd","","DataFileCharSet","DataFileCharSet","数据文件字符集编码", StandardCharsets.UTF_8.toString()),
    DataFileNumberTypeCols(9,"cmd","","DataFileNumberTypeCols","DataFileNumberTypeCols","数据文件数字类型的列集合,分隔", "[]"),
    ExcelStartRowNum(10,"cmd","","ExcelStartRowNum","ExcelStartRowNum","表格sheet页开始写入的行数", "0"),
    ExcelStartColNum(11,"cmd","","ExcelStartColNum","ExcelStartColNum","表格sheet页开始写入的列数", "0"),
    cmdEx(12,"cmd","","cmdEx","ex","举个栗子", "for example:--ModuleExcel /ModuleExcelPath/ModuleExcel.xlsx --InsertExcel /InsertExcel/InsertExcel.xlsx --CommitRow 100 --SheetName Sheet1 --DataFileName /DataFileName/DataFileName.txt --DataFileNameFieldSeparator , --DataFileCharSet GBK --DataFileNumberTypeCols [1,2,3] --ExcelStartRowNum 0 --ExcelStartColNum 0"),


    file(1,"file","f","file","file","json文件配置模式", null),
    JsonPath(2,"file","","JsonPath","JsonPath","json文件路径", null),
    JsonPathCharSet(3,"file","","JsonPathCharSet","JsonPathCharSet","JsonPath文件的字符编码", StandardCharsets.UTF_8.toString()),
    JsonFormat(4,"file","","JsonFormat","JsonFormat","json格式<所有key值不能省略>", "{\"jobs\": [{\"ModuleExcel\": null,\"InsertExcel\": \"/Users/zhengguiyang/File/test.xlsx\",\"CommitRow\": 100,\"sheetConfigList\": [{\"SheetName\": \"Sheet1\",\"DataFileName\": \"/Users/zhengguiyang/File/test.txt\",\"DataFileFieldSeparator\": \",\",\"DataFileCharSet\": \"GBK\",\"DataFileNumberTypeCols\": [2,3],\"ExcelStartRowNum\": 1,\"ExcelStartColNum\": 1}]}]}"),
    fileEx(5,"file","","fileEx","ex","举个栗子", "for example: -f --JsonPath /JsonPath/jobs.json"),

    ;

    private final int id;
    private final String group;
    private final String shortOption;
    private final String longOption;
    private final String args;
    private final String description;
    private final String defaultValue;



    OptionEnum(int id, String group, String shortOption, String longOption, String args, String description, String defaultValue) {
        this.shortOption = shortOption;
        this.longOption = longOption;
        this.args = args;
        this.description = description;
        this.group = group;
        this.id = id;
        this.defaultValue = defaultValue;
    }

    public String getShortOption() {
        return shortOption;
    }

    public String getLongOption() {
        return longOption;
    }

    public String getArgs() {
        return args;
    }

    public String getDescription() {
        return description;
    }

    public String getGroup() {
        return group;
    }

    public int getId() {
        return id;
    }

    public String getDefaultValue() {
        return defaultValue;
    }
}
